package entity;

import java.lang.reflect.Modifier;

public class Baby {
    private String name;
    private Woman mother;
    private String gender;

    public Baby(Woman mother,String gender) {
        this.mother = mother;
        this.gender = gender;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public Woman getMother() {
        return mother;
    }

    public void setMother(Woman mother) {
        this.mother = mother;
    }
    public void introduce() {
        System.out.println("我是一个"+getGender()+"宝宝，我的妈妈是："+this.getMother().getName());
        if(name==null){
            System.out.println("我还没取名字呢");
        }else {
            System.out.println("我叫："+this.getName());
        }
    }
}
